function Analyze_p()
    clear all;clc;cd('./');format compact;format short g;close all hidden;

% % % %  Paras = [ r mu sigma rho gamma x0 I p  eta1 eta2 lambda T];;
    ip=9;
    dana=1;
    p=10:dana:19;
    ana=p;
    

    n=length(ana);
   Paras = Parameters;
    %%%[xi0,xi1,xis,xip0,Xip,phi0,phi1,phis,Phip,AICs,AICp,Pi,u]
    xi0=zeros(n,1);
    xi1=zeros(n,1);
    xis=zeros(n,1);
    xip0=zeros(n,1);
    xip=zeros(n,1);
    phi0=zeros(n,1);
    phi1=zeros(n,1);
    phis=zeros(n,1);
    phip=zeros(n,1);
    Cs=zeros(n,1);
    Cp=zeros(n,1);
    pi=zeros(n,1);
    Fp=zeros(n,1);
    
   % [xis,Xip,Phip,Ppi,AICp,u] 
    bxis=zeros(n,1);
     bxip=zeros(n,1);
    bphip=zeros(n,1);
    bpi=zeros(n,1);
    bCp=zeros(n,1);
    bFp=zeros(n,1);
   
    for i=1:n
        Paras(ip)=ana(i);
        [xi0(i),xi1(i),xis(i),xip0(i),xip(i),phi0(i),phi1(i),phis(i),phip(i),Cs(i),Cp(i),pi(i),Fp(i)]=Solve_model(Paras);   
        [bxis(i),bxip(i),bphip(i),bpi(i),bCp(i),bFp(i)]=Solve_model_B(Paras);  
    end 
  %______________________________
  %______________________________

  
 
  
  
  
  
         figure
    plot(p,xis,'-p',p,xi0,'-sm',p,xi1,':k',p,xi0,'-oc','linewidth',3);
    xlabel('Funding gap','Fontsize',16,'Fontname', 'Times');
    ylabel('Investment threshold','Fontsize',16,'Fontname', 'Times');
    hg = legend('SE with high','PE with high','SE with low','FB with high','FB with low',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
   % xlim([x(1),x(length(x))]);
    saveas(gcf,'2-1','epsc');
    saveas(gcf,'2-1','png');

  
  
     figure
    plot(p,Cs,'-p',p,Cp,'--r',p,bCp,'-*b','linewidth',3);
    xlabel('Funding gap','Fontsize',16,'Fontname', 'Times');
    ylabel('Cost of adverse selection','Fontsize',16,'Fontname', 'Times');
    hg = legend('SE','PE without learning','PE with learning',0); optex={'fontsize', 16, 'fontname', 'Times','Interpreter','tex'};  set(hg, optex{:});
    saveas(gcf,'4-2','epsc');
    saveas(gcf,'4-2','png');  
     
    
    
   

    
    
end